{# src/Site/GeneralBundle/Resources/views/Default/index.twig.html #}
{# Author : Bassoumi Julia #}

{% extends "::layout.html.twig" %}

{% block title %}
Index - {{ parent() }}
{% endblock %}

{% block body %}
<h2 style="text-align:center" class="sub-header">Trombinoscope</h2>
<div class="table-responsive">
 {% if afficherFlash %}
        <div class="alert alert-{{typeFlash}}">{{flash}}</div>
    {% endif %}
  <table class="table table-striped" style="text-align:center">
    <thead>
      <tr>
        <th>Nom</th>
        <th>Prénom</th>
        <th>Photo</th>
      </tr>
    </thead>
    <tbody>
      {% for etudiant in etudiants %}
       <tr>
         {% for info in etudiant %}
          {% if info|length > 2%}
       <td>{{ info }}</td>
          {%else %}
      <td> <img src="{{asset(info)}}" /></td>
         {%endif%}
	{% endfor %}
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endblock %}